<template>
  <div class="add-button">
    <el-tooltip
      class="item"
      effect="dark"
      :content="contentText"
      :placement="placement"
    >
      <i class="el-icon-circle-plus-outline brandcolor" @click="addItem"></i>
    </el-tooltip>
  </div>
</template>

<script>
export default {
  name: "AddButton",
  props: {
    contentText: {
      type: String,
      default: "新增",
    },
    placement: {
      type: String,
      default: "top",
    },
  },
  methods: {
    addItem() {
      this.$emit("addItem");
    },
  },
};
</script>

<style lang="scss" scoped>
.add-button {
  .el-icon-circle-plus-outline {
    cursor: pointer;
    font-size: 16px;
  }
}
</style>
